Platform Explorer / Nuxeo Platform LTS 2015 7.10

Contribution org.nuxeo.elasticsearch.index.audit.contrib--elasticSearchIndex

This contribution is part of XML component org.nuxeo.elasticsearch.index.audit.contrib inside nuxeo-runtime-7.10-HF06.jar /opt/tmp/tmp-explorer/nuxeo-cap-7.10-tomcat/nxserver/config/elasticsearch-audit-index-config.xml

Extension Point

Extension point elasticSearchIndex of component ElasticSearchComponent.

Contributed Items

  • <elasticSearchIndex name="nuxeo-audit" type="entry">
          <settings>{
       "analysis" : {
          "filter" : {
             "truncate_filter" : {
                "length" : 256,
                "type" : "truncate"
             },
             "word_delimiter_filter" : {
               "type" : "word_delimiter",
               "preserve_original" : true
             },
             "en_stem_filter" : {
                "name" : "minimal_english",
                "type" : "stemmer"
             },
             "en_stop_filter" : {
                "stopwords" : [
                   "_english_"
                ],
                "type" : "stop"
             }
         },
          "tokenizer" : {
             "path_tokenizer" : {
                "delimiter" : "/",
                "type" : "path_hierarchy"
             }
          },
          "analyzer" : {
             "en_analyzer" : {
                "alias" : "fulltext",
                "char_filter":  [ "html_strip"],
                "filter" : [
                   "word_delimiter_filter",
                   "lowercase",
                   "en_stop_filter",
                   "en_stem_filter"
                ],
                "type" : "custom",
                "tokenizer" : "standard"
             },
             "path_analyzer" : {
                "type" : "custom",
                "tokenizer" : "path_tokenizer"
             },
            "default" : {
                "type" : "custom",
                "filter" : [ "truncate_filter" ],
                "tokenizer" : "keyword"
             }
          }
       }
    }
          </settings>
          <mapping>
            {
               "_all" : {
                 "analyzer" : "fulltext"
              },
              "properties" : {
                "comment" : {
                  "type" : "multi_field",
                  "fields" : {
                    "comment" : {
                      "type" : "string"
                    },
                    "fulltext" : {
                      "type": "string",
                      "analyzer" : "fulltext"
                    }
                  }
                },
    	    "eventDate": {
    	      "format": "dateOptionalTime",
    	      "type": "date"
    	    },
    	    "logDate": {
    	      "format": "dateOptionalTime",
    	      "type": "date"
    	    },
                "docPath": {
                  "type" : "multi_field",
                  "fields" : {
                    "children" : {
                      "search_analyzer" : "keyword",
                      "index_analyzer" : "path_analyzer",
                      "type" : "string"
                    },
                    "docPath" : {
                      "index" : "not_analyzed",
                      "type" : "string"
                    }
                  }
                }
              }
            }
          </mapping>
        </elasticSearchIndex>

XML Source

<extension point="elasticSearchIndex" target="org.nuxeo.elasticsearch.ElasticSearchComponent">

    <elasticSearchIndex name="nuxeo-audit" type="entry">
      <settings>{
   "analysis" : {
      "filter" : {
         "truncate_filter" : {
            "length" : 256,
            "type" : "truncate"
         },
         "word_delimiter_filter" : {
           "type" : "word_delimiter",
           "preserve_original" : true
         },
         "en_stem_filter" : {
            "name" : "minimal_english",
            "type" : "stemmer"
         },
         "en_stop_filter" : {
            "stopwords" : [
               "_english_"
            ],
            "type" : "stop"
         }
     },
      "tokenizer" : {
         "path_tokenizer" : {
            "delimiter" : "/",
            "type" : "path_hierarchy"
         }
      },
      "analyzer" : {
         "en_analyzer" : {
            "alias" : "fulltext",
            "char_filter":  [ "html_strip"],
            "filter" : [
               "word_delimiter_filter",
               "lowercase",
               "en_stop_filter",
               "en_stem_filter"
            ],
            "type" : "custom",
            "tokenizer" : "standard"
         },
         "path_analyzer" : {
            "type" : "custom",
            "tokenizer" : "path_tokenizer"
         },
        "default" : {
            "type" : "custom",
            "filter" : [ "truncate_filter" ],
            "tokenizer" : "keyword"
         }
      }
   }
}
      </settings>
      <mapping>
        {
           "_all" : {
             "analyzer" : "fulltext"
          },
          "properties" : {
            "comment" : {
              "type" : "multi_field",
              "fields" : {
                "comment" : {
                  "type" : "string"
                },
                "fulltext" : {
                  "type": "string",
                  "analyzer" : "fulltext"
                }
              }
            },
	    "eventDate": {
	      "format": "dateOptionalTime",
	      "type": "date"
	    },
	    "logDate": {
	      "format": "dateOptionalTime",
	      "type": "date"
	    },
            "docPath": {
              "type" : "multi_field",
              "fields" : {
                "children" : {
                  "search_analyzer" : "keyword",
                  "index_analyzer" : "path_analyzer",
                  "type" : "string"
                },
                "docPath" : {
                  "index" : "not_analyzed",
                  "type" : "string"
                }
              }
            }
          }
        }
      </mapping>
    </elasticSearchIndex>

  </extension>